home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10148 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Randomize
  5. Date: 6 Mar 1996 09:53:23 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4hjnaj$qc4@news1.usa.pipeline.com>
  8. References: <313BD7D1.6143@IntNet.net>
  9. NNTP-Posting-Host: pipe13.h1.usa.pipeline.com
  10. X-PipeUser: grantp
  11. X-PipeHub: usa.pipeline.com
  12. X-PipeGCOS: (Pete)
  13. X-Newsreader: Pipeline v3.5.0
  14.  
  15. On Mar 05, 1996 00:57:37 in article <Randomize>, 'Dave Cohoon
  16. <kahuna@IntNet.net>' wrote: 
  17.  
  18.  
  19. >I have been learning C++ from books for the last 3 months, untill the next
  20.  
  21. >semester rolls around. 
  22. >I've been working with "Teach Yourself C++ in 21 days" by Jesse Liberty. 
  23. >2 questions as follows: 
  24. >(1) I cannot find a way to create a randomized int, this is one of the
  25. simplest  
  26. >functions in 
  27. >basic, but in C++, I have no idea. Please Help. 
  28.   1.  Once in your program, call srand().  Check your online docs on how 
  29. to pass it time of day as a seed. 
  30.  
  31.   2.  rand() is the function to call for a pseudo random number. 
  32.  
  33. [... other questions deleted ---] 
  34. >P.S.----recently heard a few rumors that JAVA will probably be the future 
  35.  
  36. >standard for the  
  37. >windows environment, Does this seem to be a true prediction, and if so,
  38. How  
  39. >different is it from  
  40. >C++ 
  41. My guess is no. 
  42. But I don't have a crystal ball.... :-) 
  43.  
  44. -- 
  45. Pete Grant 
  46. Kalevi, Inc. 
  47. Software Engineering & development
  48.